package com.xuelang.pipeline.artifact.app.resource.converter;

import com.xuelang.pipeline.artifact.client.resource.dto.RepositoryPackageDTO;
import com.xuelang.pipeline.artifact.domain.resource.RepositoryPackage;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

/**
 * 制品包DTO与制品包实体转换器
 *
 * @author xiwen.zxg
 * @since 2024/5/15
 */
@Mapper
public interface RepositoryPackageDTOToRepositoryPackageConverter {
    RepositoryPackageDTOToRepositoryPackageConverter INSTANCE = Mappers.getMapper(RepositoryPackageDTOToRepositoryPackageConverter.class);

    /**
     * RepositoryPackage转化为RepositoryPackageDTO
     * @param repositoryPackage
     * @return
     */
    RepositoryPackageDTO repositoryPackageToRepositoryPackageDTO(RepositoryPackage repositoryPackage);

    /**
     * RepositoryPackageDTO转化为RepositoryPackage
     * @param repositoryPackageDTO
     * @return
     */
    RepositoryPackage repositoryPackageDTOToRepositoryPackage(RepositoryPackageDTO repositoryPackageDTO);
}
